﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using NaireSystem.Datas;
using TYBase;

namespace NaireSystem.Api
{
    public class LocalHttp : TYHttp
    {
        public override bool Excute(out string result)
        {
            if (AppData.user != null && AppData.user.token.NotNull())
            {
                Addheader("authorization", "Bearer " + AppData.user.token);
            }
            return base.Excute(out result);
        }

        public override bool UploadFile(string filePath, out string result)
        {
            if (AppData.user != null && AppData.user.token.NotNull())
            {
                Addheader("authorization", "Bearer " + AppData.user.token);
            }
            return base.UploadFile(filePath, out result);
        }
    }
}
